package masterjava.reporting.client.dao;

import com.google.gwt.user.client.rpc.AsyncCallback;
import masterjava.common.client.gwt.dao.ClientDao;
import masterjava.reporting.shared.entity.TimestampData;

import java.util.List;

/**
 * User: Grigory Kislin
 * Date: 29/06/11
 */
public class TimestampDataDao extends ClientDao<TimestampData, Long> {
    private static TimestampDataDao INSTANCE = new TimestampDataDao();

    private TimestampDataDao() {
        super(TimestampData.class);
    }

    public void getByDataId(Long dataId, AsyncCallback<List<TimestampData>> callback) {
        findByNamedQueryAndNamedParam(TimestampData.FIND_BY_DATA_ID, TimestampData.DATA_ID, dataId, callback);
    }

    public static TimestampDataDao get() {
        return INSTANCE;
    }
}
